using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.Hr.Bill;

/// <summary>
/// 请假出差申请表
/// </summary>
[Display(Name = "请假出差申请", Description = "员工请假出差申请表单", GroupName = "日常业务表单")]
public class SysDailyLeaveRequestBill : BaseBill
{
    [Required]
    [Display(Name = "员工ID", Description = "关联员工主键", GroupName = "退休信息")]
    public Guid? PersonId { get; set; }

    [Display(Name = "员工", Description = "关联的员工实体", GroupName = "退休信息")]
    public SysPerson Person { get; set; }

    // 请假/出差信息
    [Required]
    [Display(Name = "员工工号", Description = "员工工号", GroupName = "请假出差信息")]
    [StringLength(128)]
    public string StaffNo { get; set; }

    [Required]
    [Display(Name = "员工姓名", Description = "员工姓名", GroupName = "请假出差信息")]
    [StringLength(128)]
    public string Name { get; set; }

    [Required]
    [Display(Name = "类型", Description = "请假/出差", GroupName = "请假出差信息")]
    public LeaveType? LeaveType { get; set; } // 请假/出差

    [Required]
    [Display(Name = "开始时间", Description = "开始时间", GroupName = "请假出差信息")]
    public DateTime? StartTime { get; set; }

    [Required]
    [Display(Name = "结束时间", Description = "结束时间", GroupName = "请假出差信息")]
    public DateTime? EndTime { get; set; }

    [Required]
    [Column(TypeName = "decimal(8,2)")]
    [Display(Name = "天数", Description = "天数", GroupName = "请假出差信息")]
    public decimal? Days { get; set; }

    [Required]
    [Display(Name = "事由", Description = "事由", GroupName = "请假出差信息")]
    [StringLength(256)]
    public string Reason { get; set; }

    [Display(Name = "是否影响打卡", Description = "请假/出差是否影响打卡记录", GroupName = "请假出差信息")]
    public bool? AffectsAttendance { get; set; }

    [Display(Name = "证明文件ID", Description = "相关的证明材料ID", GroupName = "附件信息")]
    public Guid? SupportingDocumentId { get; set; }

    [Display(Name = "证明文件", Description = "相关的证明材料", GroupName = "附件信息")]
    public FileAttachment SupportingDocument { get; set; }
}